#ifndef xpack_lang_cxx_private_format_base
#define xpack_lang_cxx_private_format_base
#pragma push_macro("xuser")
#undef  xuser
#define xuser mixc::lang_cxx_private_format_base::inc
#include"define/base_type.hpp"
#include"macro/xexport.hpp"
#pragma pop_macro("xuser")

namespace mixc::lang_cxx_private_format_base::origin{
    struct format_base{
        constexpr format_base(uxx offset): m_field_offset(u08(offset)){}

        mutable u16     m_align_width         : 15  = 0;
        mutable u16     m_align_adjust        : 1   = 1;

        mutable u08     m_field_offset              = 0;
        mutable u08     m_mode                : 6   = 0;
        mutable u08     m_align_mode          : 2   = 0;

        mutable u16     m_numeration                = 10;
        mutable char    m_left_padding_char         = ' ';
        mutable char    m_right_padding_char        = ' ';

        template<class value_t>
        value_t & get(){
            return *(value_t *)(u08p(this) + m_field_offset);
        }

        enum{
            empty_numeration = (1 << xbitsof(format_base::m_numeration)) - 1,
        };
    };
}

#endif

xexport_space(mixc::lang_cxx_private_format_base::origin)
